package com.ruoyi.game.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.game.mapper.GameWithdrawalRecordMapper;
import com.ruoyi.game.domain.GameWithdrawalRecord;
import com.ruoyi.game.service.IGameWithdrawalRecordService;

/**
 * 提现记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-03-21
 */
@Service
public class GameWithdrawalRecordServiceImpl implements IGameWithdrawalRecordService 
{
    @Autowired
    private GameWithdrawalRecordMapper gameWithdrawalRecordMapper;

    /**
     * 查询提现记录
     * 
     * @param id 提现记录主键
     * @return 提现记录
     */
    @Override
    public GameWithdrawalRecord selectGameWithdrawalRecordById(Long id)
    {
        return gameWithdrawalRecordMapper.selectGameWithdrawalRecordById(id);
    }

    /**
     * 查询提现记录列表
     * 
     * @param gameWithdrawalRecord 提现记录
     * @return 提现记录
     */
    @Override
    public List<GameWithdrawalRecord> selectGameWithdrawalRecordList(GameWithdrawalRecord gameWithdrawalRecord)
    {
        return gameWithdrawalRecordMapper.selectGameWithdrawalRecordList(gameWithdrawalRecord);
    }

    /**
     * 新增提现记录
     * 
     * @param gameWithdrawalRecord 提现记录
     * @return 结果
     */
    @Override
    public int insertGameWithdrawalRecord(GameWithdrawalRecord gameWithdrawalRecord)
    {
        return gameWithdrawalRecordMapper.insertGameWithdrawalRecord(gameWithdrawalRecord);
    }

    /**
     * 修改提现记录
     * 
     * @param gameWithdrawalRecord 提现记录
     * @return 结果
     */
    @Override
    public int updateGameWithdrawalRecord(GameWithdrawalRecord gameWithdrawalRecord)
    {
        gameWithdrawalRecord.setUpdateTime(DateUtils.getNowDate());
        return gameWithdrawalRecordMapper.updateGameWithdrawalRecord(gameWithdrawalRecord);
    }

    /**
     * 批量删除提现记录
     * 
     * @param ids 需要删除的提现记录主键
     * @return 结果
     */
    @Override
    public int deleteGameWithdrawalRecordByIds(Long[] ids)
    {
        return gameWithdrawalRecordMapper.deleteGameWithdrawalRecordByIds(ids);
    }

    /**
     * 删除提现记录信息
     * 
     * @param id 提现记录主键
     * @return 结果
     */
    @Override
    public int deleteGameWithdrawalRecordById(Long id)
    {
        return gameWithdrawalRecordMapper.deleteGameWithdrawalRecordById(id);
    }


}
